
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>表单组件 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="media.html" />
    
    
    <link rel="prev" href="basics.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    入门
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../introduction/environment.html">
            
                <a href="../introduction/environment.html">
            
                    
                    环境搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../introduction/hello.html">
            
                <a href="../introduction/hello.html">
            
                    
                    HelloWorld
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../introduction/dev-and-debug.html">
            
                <a href="../introduction/dev-and-debug.html">
            
                    
                    开发与调试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    参考
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../framework/file.html">
            
                <a href="../framework/file.html">
            
                    
                    文件组织
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../framework/manifest.html">
            
                <a href="../framework/manifest.html">
            
                    
                    manifest文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../framework/nml.html">
            
                <a href="../framework/nml.html">
            
                    
                    nml文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../framework/page.html">
            
                <a href="../framework/page.html">
            
                    
                    页面与组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    组件
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="general.html">
            
                <a href="general.html">
            
                    
                    通用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="container.html">
            
                <a href="container.html">
            
                    
                    容器组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="basics.html">
            
                <a href="basics.html">
            
                    
                    基础组件
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.4" data-path="form.html">
            
                <a href="form.html">
            
                    
                    表单组件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="media.html">
            
                <a href="media.html">
            
                    
                    媒体组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    接口
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../api/general.html">
            
                <a href="../api/general.html">
            
                    
                    通用规则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../api/basic.html">
            
                <a href="../api/basic.html">
            
                    
                    基本功能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../api/interface.html">
            
                <a href="../api/interface.html">
            
                    
                    界面交互
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../api/request.html">
            
                <a href="../api/request.html">
            
                    
                    网络访问
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../api/storage.html">
            
                <a href="../api/storage.html">
            
                    
                    文件数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="../api/system.html">
            
                <a href="../api/system.html">
            
                    
                    系统能力
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="../api/media.html">
            
                <a href="../api/media.html">
            
                    
                    图形图像
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="../api/service.html">
            
                <a href="../api/service.html">
            
                    
                    厂商服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="../api/third.html">
            
                <a href="../api/third.html">
            
                    
                    第三方服务
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >表单组件</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x8868;&#x5355;&#x7EC4;&#x4EF6;">&#x8868;&#x5355;&#x7EC4;&#x4EF6;</h2>
<h3 id="input">input</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x63D0;&#x4F9B;&#x53EF;&#x4EA4;&#x4E92;&#x7684;&#x754C;&#x9762;&#xFF0C;&#x63A5;&#x6536;&#x7528;&#x6237;&#x7684;&#x8F93;&#x5165;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x5355;&#x884C;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">type</td>
<td style="text-align:left">button&#x3001;checkbox&#x3001;radio&#x3001;text&#x3001;email&#x3001;date&#x3001;time&#x3001;number&#x3001;password</td>
<td style="text-align:left">text</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x4E0D;&#x652F;&#x6301;&#x52A8;&#x6001;&#x4FEE;&#x6539;</td>
</tr>
<tr>
<td style="text-align:left">checked</td>
<td style="text-align:left"><code>&lt;boolean&gt;</code></td>
<td style="text-align:left">false</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x5F53;&#x524D;&#x7EC4;&#x4EF6;&#x7684;checked&#x72B6;&#x6001;&#xFF0C;&#x53EF;&#x89E6;&#x53D1;checked&#x4F2A;&#x7C7B;&#xFF0C;type&#x4E3A;checkbox&#x65F6;&#x751F;&#x6548;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">name</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">input&#x7EC4;&#x4EF6;&#x540D;&#x79F0;</td>
</tr>
<tr>
<td style="text-align:left">value</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">input&#x7EC4;&#x4EF6;&#x7684;&#x503C;</td>
</tr>
</tbody>
</table>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left">0xde000000</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6587;&#x672C;&#x989C;&#x8272;</td>
</tr>
<tr>
<td style="text-align:left">font-size</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">37.5px</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6587;&#x672C;&#x5C3A;&#x5BF8;</td>
</tr>
<tr>
<td style="text-align:left">placeholder</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left">37.5px</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x63D0;&#x793A;&#x6587;&#x672C;&#x7684;&#x5185;&#x5BB9;&#xFF0C;type&#x4E3A;text&#x3001;email&#x3001;date&#x3001;time&#x65F6;&#x751F;&#x6548;</td>
</tr>
<tr>
<td style="text-align:left">placeholder-color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left">0x61000000</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x63D0;&#x793A;&#x6587;&#x672C;&#x7684;&#x989C;&#x8272;&#xFF0C;type&#x4E3A;text&#x3001;email&#x3001;date&#x3001;time&#x65F6;&#x751F;&#x6548;</td>
</tr>
<tr>
<td style="text-align:left">width</td>
<td style="text-align:left"><code>&lt;length&gt;</code>&#x3001;<code>&lt;percentage&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">type&#x4E3A;button&#x65F6;&#xFF0C;&#x9ED8;&#x8BA4;&#x503C;&#x4E3A;128px</td>
</tr>
<tr>
<td style="text-align:left">height</td>
<td style="text-align:left"><code>&lt;length&gt;</code>&#x3001;<code>&lt;percentage&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">type&#x4E3A;button&#x65F6;&#xFF0C;&#x9ED8;&#x8BA4;&#x503C;&#x4E3A;128px</td>
</tr>
</tbody>
</table>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<p>&#x652F;&#x6301;change&#x4E8B;&#x4EF6;&#xFF0C;input&#x7EC4;&#x4EF6;&#x7684;&#x503C;&#x3001;checked&#x72B6;&#x6001;&#x53D1;&#x751F;&#x53D8;&#x5316;&#x65F6;&#x89E6;&#x53D1;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">text&#x3001;email&#x3001;date&#x3001;time&#x3001;number</th>
<th style="text-align:left">checkbox</th>
<th style="text-align:left">radio</th>
<th style="text-align:left">&#x5907;&#x6CE8;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">name</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x2714;</td>
<td style="text-align:left">&#x2714;</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">value</td>
<td style="text-align:left">&#x2714;</td>
<td style="text-align:left">&#x2714;</td>
<td style="text-align:left">&#x2714;</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">checked</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x2714;</td>
<td style="text-align:left"></td>
<td style="text-align:left">-</td>
</tr>
</tbody>
</table>
<p>&#x65B9;&#x6CD5;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">focus</td>
<td style="text-align:left"><code>{focus:true/false}</code>&#xFF0C;focus &#x4E0D;&#x4F20;&#x9ED8;&#x8BA4;&#x4E3A; true&#x3002;</td>
<td style="text-align:left">&#x4F7F;&#x7EC4;&#x4EF6;&#x83B7;&#x5F97;&#x6216;&#x8005;&#x5931;&#x53BB;&#x7126;&#x70B9;&#xFF0C;&#x53EF;&#x89E6;&#x53D1;focus&#x4F2A;&#x7C7B;&#xFF0C;type&#x4E3A;text&#x3001;email&#x3001;date&#x3001;time&#x3001;number&#x3001;password&#x65F6;&#xFF0C;&#x53EF;&#x5F39;&#x51FA;&#x6216;&#x6536;&#x8D77;&#x8F93;&#x5165;&#x6CD5;&#x3002;</td>
</tr>
</tbody>
</table>
<h3 id="label">label</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x4E3A;input&#x3001;textarea&#x7EC4;&#x4EF6;&#x5B9A;&#x4E49;&#x6807;&#x6CE8;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">target</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x76EE;&#x6807;input&#x7EC4;&#x4EF6;id</td>
</tr>
</tbody>
</table>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<p>&#x652F;&#x6301;text&#x6837;&#x5F0F;&#x3002;</p>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x65E0;&#x3002;</p>
<h3 id="option">option</h3>
<p>&#x6982;&#x8FF0;</p>
<p><code>&lt;select&gt;</code>&#x7684;&#x5B50;&#x7EC4;&#x4EF6;&#xFF0C;&#x7528;&#x6765;&#x5C55;&#x793A;&#x4E0B;&#x62C9;&#x9009;&#x62E9;&#x5177;&#x4F53;&#x9879;&#x76EE;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">selected</td>
<td style="text-align:left"><code>&lt;boolean&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x9009;&#x62E9;&#x9879;&#x662F;&#x5426;&#x4E3A;&#x4E0B;&#x62C9;&#x5217;&#x8868;&#x7684;&#x9ED8;&#x8BA4;&#x9879;</td>
</tr>
<tr>
<td style="text-align:left">value</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x662F;</td>
<td style="text-align:left">&#x9009;&#x62E9;&#x9879;&#x7684;&#x503C;</td>
</tr>
</tbody>
</table>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<h3 id="picker">picker</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x6EDA;&#x52A8;&#x9009;&#x62E9;&#x5668;&#xFF0C;&#x76EE;&#x524D;&#x652F;&#x6301;&#x4E09;&#x79CD;&#x9009;&#x62E9;&#x5668;&#xFF1A;&#x666E;&#x901A;&#x9009;&#x62E9;&#x5668;&#xFF0C;&#x65E5;&#x671F;&#x9009;&#x62E9;&#x5668;&#xFF0C;&#x65F6;&#x95F4;&#x9009;&#x62E9;&#x5668;&#x3002;&#x9ED8;&#x8BA4;&#x4E3A;&#x666E;&#x901A;&#x9009;&#x62E9;&#x5668;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">type</td>
<td style="text-align:left">text&#x3001;date&#x3001;time</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x662F;</td>
<td style="text-align:left">&#x4E0D;&#x652F;&#x6301;&#x52A8;&#x6001;&#x4FEE;&#x6539;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">start</td>
<td style="text-align:left"><code>&lt;time&gt;</code></td>
<td style="text-align:left">1970-1-1</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">type&#x4E3A;date&#x65F6;&#x751F;&#x6548;&#xFF0C;&#x8D77;&#x59CB;&#x65F6;&#x95F4;&#xFF0C;&#x683C;&#x5F0F;&#x4E3A;yyyy-MM-dd&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">end</td>
<td style="text-align:left"><code>&lt;time&gt;</code></td>
<td style="text-align:left">2100-12-31</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">type&#x4E3A;date&#x65F6;&#x751F;&#x6548;&#xFF0C;&#x7ED3;&#x675F;&#x65F6;&#x95F4;&#xFF0C;&#x683C;&#x5F0F;&#x4E3A;yyyy-MM-dd&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">range</td>
<td style="text-align:left"><code>&lt;array&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">type&#x4E3A;text&#x65F6;&#x751F;&#x6548;&#xFF0C;&#x9009;&#x62E9;&#x5668;&#x7684;&#x53D6;&#x503C;&#x8303;&#x56F4;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">selected</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left">&#x5F53;&#x524D;&#x65F6;&#x95F4;&#x6216;0</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x9009;&#x62E9;&#x5668;&#x7684;&#x9ED8;&#x8BA4;&#x53D6;&#x503C;&#x3002;type&#x4E3A;date&#x65F6;&#xFF0C;&#x683C;&#x5F0F;&#x4E3A;yyyy-MM-dd&#xFF1B;type&#x4E3A;time&#x65F6;&#xFF0C;&#x683C;&#x5F0F;&#x4E3A;hh:mm&#xFF1B;type&#x4E3A;text&#x65F6;&#xFF0C;&#x53D6;&#x503C;&#x4E3A;range&#x7684;&#x7D22;&#x5F15;&#x3002;</td>
</tr>
<tr>
<td style="text-align:left">value</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x9009;&#x62E9;&#x5668;&#x7684;&#x503C;</td>
</tr>
</tbody>
</table>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;click&#x4E8B;&#x4EF6;&#xFF0C;&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">change</td>
<td style="text-align:left"><code>date: {year:year,month:month,day:day}; time: {hour:hour,minute:minute};text: {newValue:newValue,newSelected:newSelected}</code></td>
<td style="text-align:left">&#x6EDA;&#x52A8;&#x9009;&#x62E9;&#x5668;&#x9009;&#x62E9;&#x503C;&#x540E;&#x786E;&#x5B9A;&#x65F6;&#x89E6;&#x53D1;&#xFF08;newSelected&#x4E3A;&#x7D22;&#x5F15;&#xFF09;</td>
</tr>
</tbody>
</table>
<p>&#x65B9;&#x6CD5;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">show</td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x663E;&#x793A;picker</td>
</tr>
</tbody>
</table>
<h3 id="select">select</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x4E0B;&#x62C9;&#x9009;&#x62E9;&#x6309;&#x94AE;&#xFF0C;&#x70B9;&#x51FB;&#x4F1A;&#x5F39;&#x51FA;&#x4E00;&#x4E2A;&#x5305;&#x542B;&#x6240;&#x6709;&#x53EF;&#x9009;&#x503C;&#x7684;&#x4E0B;&#x62C9;&#x83DC;&#x5355;&#xFF0C;&#x4ECE;&#x8BE5;&#x83DC;&#x5355;&#x4E2D;&#x53EF;&#x4EE5;&#x9009;&#x62E9;&#x4E00;&#x4E2A;&#x65B0;&#x503C;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4EC5;&#x652F;&#x6301;<code>&lt;option&gt;</code>&#x3002;</p>
<p>&#x5C5E;&#x6027;&#x3002;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;click&#x4E8B;&#x4EF6;&#xFF0C;&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">change</td>
<td style="text-align:left"><code>{newValue:newValue}</code></td>
<td style="text-align:left">&#x4E0B;&#x62C9;&#x9009;&#x62E9;&#x5668;&#x9009;&#x62E9;&#x503C;&#x540E;&#x89E6;&#x53D1;</td>
</tr>
</tbody>
</table>
<h3 id="slider">slider</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x6ED1;&#x52A8;&#x9009;&#x62E9;&#x5668;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">min</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">max</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">100</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">step</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">1</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left"></td>
</tr>
<tr>
<td style="text-align:left">value</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">0</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">-</td>
</tr>
</tbody>
</table>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left">0xfff0f0f0</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x80CC;&#x666F;&#x6761;&#x989C;&#x8272;</td>
</tr>
<tr>
<td style="text-align:left">selected-color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left">0xff009688</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x5DF2;&#x9009;&#x62E9;&#x989C;&#x8272;</td>
</tr>
<tr>
<td style="text-align:left">padding-[left/right]</td>
<td style="text-align:left"><code>&lt;length&gt;</code></td>
<td style="text-align:left">32px</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x5DE6;&#x53F3;&#x8FB9;&#x8DDD;</td>
</tr>
</tbody>
</table>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">change</td>
<td style="text-align:left"><code>{progress:progressValue}</code></td>
<td style="text-align:left">&#x5B8C;&#x6210;&#x4E00;&#x6B21;&#x62D6;&#x52A8;&#x540E;&#x89E6;&#x53D1;&#x7684;&#x4E8B;&#x4EF6;</td>
</tr>
</tbody>
</table>
<h3 id="switch">switch</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x5F00;&#x5173;&#x9009;&#x62E9;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">checked</td>
<td style="text-align:left"><code>&lt;boolean&gt;</code></td>
<td style="text-align:left">false</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x53EF;&#x89E6;&#x53D1;checked&#x4F2A;&#x7C7B;</td>
</tr>
</tbody>
</table>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">change</td>
<td style="text-align:left"><code>{checked:checkedValue}</code></td>
<td style="text-align:left">checked&#x72B6;&#x6001;&#x6539;&#x53D8;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
</tbody>
</table>
<h3 id="textarea">textarea</h3>
<p>&#x6982;&#x8FF0;</p>
<p>&#x63D0;&#x4F9B;&#x53EF;&#x4EA4;&#x4E92;&#x7684;&#x754C;&#x9762;&#xFF0C;&#x63A5;&#x6536;&#x7528;&#x6237;&#x7684;&#x8F93;&#x5165;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x591A;&#x884C;&#x3002;</p>
<p>&#x5B50;&#x7EC4;&#x4EF6;</p>
<p>&#x4E0D;&#x652F;&#x6301;&#x3002;</p>
<p>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;<code>&lt;text&gt;</code>&#x5C5E;&#x6027;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x5C5E;&#x6027;&#x3002;</p>
<p>&#x6837;&#x5F0F;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x6837;&#x5F0F;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x7C7B;&#x578B;</th>
<th style="text-align:left">&#x9ED8;&#x8BA4;&#x503C;</th>
<th style="text-align:left">&#x5FC5;&#x586B;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left">0xde000000</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6587;&#x672C;&#x989C;&#x8272;</td>
</tr>
<tr>
<td style="text-align:left">font-size</td>
<td style="text-align:left"><code>&lt;number&gt;</code></td>
<td style="text-align:left">37.5px</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x6587;&#x672C;&#x5C3A;&#x5BF8;</td>
</tr>
<tr>
<td style="text-align:left">placeholder</td>
<td style="text-align:left"><code>&lt;string&gt;</code></td>
<td style="text-align:left"></td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x63D0;&#x793A;&#x6587;&#x672C;&#x7684;&#x5185;&#x5BB9;</td>
</tr>
<tr>
<td style="text-align:left">placeholder-color</td>
<td style="text-align:left"><code>&lt;color&gt;</code></td>
<td style="text-align:left">0x61000000</td>
<td style="text-align:left">&#x5426;</td>
<td style="text-align:left">&#x63D0;&#x793A;&#x6587;&#x672C;&#x7684;&#x989C;&#x8272;</td>
</tr>
</tbody>
</table>
<p>&#x4E8B;&#x4EF6;</p>
<p>&#x652F;&#x6301;&#x901A;&#x7528;&#x4E8B;&#x4EF6;&#x3002;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">change</td>
<td style="text-align:left"><code>{text:newText}</code></td>
<td style="text-align:left">&#x8F93;&#x5165;&#x5185;&#x5BB9;&#x53D1;&#x751F;&#x53D8;&#x5316;&#x65F6;&#x89E6;&#x53D1;</td>
</tr>
</tbody>
</table>
<p>&#x65B9;&#x6CD5;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">&#x53C2;&#x6570;</th>
<th style="text-align:left">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">focus</td>
<td style="text-align:left"><code>{focus:true&#x3001;false}</code>&#xFF0C;focus&#x4E0D;&#x4F20;&#x9ED8;&#x8BA4;&#x4E3A;true&#x3002;</td>
<td style="text-align:left">&#x4F7F;&#x7EC4;&#x4EF6;&#x83B7;&#x5F97;&#x6216;&#x8005;&#x5931;&#x53BB;&#x7126;&#x70B9;&#xFF0C;&#x53EF;&#x89E6;&#x53D1;focus&#x4F2A;&#x7C7B;&#xFF0C;&#x53EF;&#x5F39;&#x51FA;&#x6216;&#x6536;&#x8D77;&#x8F93;&#x5165;&#x6CD5;&#x3002;</td>
</tr>
</tbody>
</table>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="basics.html" class="navigation navigation-prev " aria-label="Previous page: 基础组件">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="media.html" class="navigation navigation-next " aria-label="Next page: 媒体组件">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"表单组件","level":"1.4.4","depth":2,"next":{"title":"媒体组件","level":"1.4.5","depth":2,"path":"component/media.md","ref":"component/media.md","articles":[]},"previous":{"title":"基础组件","level":"1.4.3","depth":2,"path":"component/basics.md","ref":"component/basics.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"component/form.md","mtime":"2018-03-12T09:30:27.927Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-03-21T12:50:57.603Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

